define(function(require,exports,module){
    var Base={
		mBaserSvrUrl:window.BaseServerUrl,
		localStorage:window.localStorage
	};
	
	function JlnRequest(){
		this.params={}
	}
	module.exports=MessageProxy;
function MessageProxy(){
	function messageSubmit(request, success, ignoreError) {
	    var url = Base.mBaserSvrUrl+'/message';
        if (request.svr == null) request.svr = undefined;
	    if (request.token == null) request.token = undefined;
	    var content = JSON.stringify(request);
       
	    url = url + '?f=t&data=' + encodeURIComponent(content);
	    url = url + '&CallBack=?';
        $.getJSON(url,success);

	}

	function getMessagesRq(union,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMessages';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['t']=type;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMessagesRequest=function(userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMessagesRq(true,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getMessages=function(userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMessagesRq(false,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getMyMessagesRq(union,userToken,userType,beginTime,endTime,type,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMyMessages';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['ut']=userType;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['t']=type;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMyMessagesRequest=function(userToken,userType,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMyMessagesRq(true,userToken,userType,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getMyMessages=function(userToken,userType,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMyMessagesRq(false,userToken,userType,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function setMyMessageReadRq(union,userToken,userType,messageId,success,ignoreError){
        var request=new JlnRequest();
        request.func='setMyMessageRead';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['ut']=userType;
		request.params['mid']=messageId;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setMyMessageReadRequest=function(userToken,userType,messageId,success,ignoreError){
       var request= setMyMessageReadRq(true,userToken,userType,messageId,success,ignoreError);
       return request;
    }
	this.setMyMessageRead=function(userToken,userType,messageId,success,ignoreError){
       var request= setMyMessageReadRq(false,userToken,userType,messageId,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function setMyAllMessageReadRq(union,userToken,userType,success,ignoreError){
        var request=new JlnRequest();
        request.func='setMyAllMessageRead';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['ut']=userType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setMyAllMessageReadRequest=function(userToken,userType,success,ignoreError){
       var request= setMyAllMessageReadRq(true,userToken,userType,success,ignoreError);
       return request;
    }
	this.setMyAllMessageRead=function(userToken,userType,success,ignoreError){
       var request= setMyAllMessageReadRq(false,userToken,userType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getMySentMessagesRq(union,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMySentMessages';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['t']=type;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMySentMessagesRequest=function(userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMySentMessagesRq(true,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getMySentMessages=function(userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError){
       var request= getMySentMessagesRq(false,userToken,beginTime,endTime,type,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function sendMessageRq(union,userToken,type,title,content,toUserId,toType,isSMS,success,ignoreError){
        var request=new JlnRequest();
        request.func='sendMessage';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['t']=type;
		request.params['t0']=title;
		request.params['c']=content;
		request.params['tuid']=toUserId;
		request.params['tt']=toType;
		request.params['isms']=isSMS;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.sendMessageRequest=function(userToken,type,title,content,toUserId,toType,isSMS,success,ignoreError){
       var request= sendMessageRq(true,userToken,type,title,content,toUserId,toType,isSMS,success,ignoreError);
       return request;
    }
	this.sendMessage=function(userToken,type,title,content,toUserId,toType,isSMS,success,ignoreError){
       var request= sendMessageRq(false,userToken,type,title,content,toUserId,toType,isSMS,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function systemSendMessageRq(union,title,content,type,toUserId,toType,isSMS,success,ignoreError){
        var request=new JlnRequest();
        request.func='systemSendMessage';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['t']=title;
		request.params['c']=content;
		request.params['t0']=type;
		request.params['tuid']=toUserId;
		request.params['tt']=toType;
		request.params['isms']=isSMS;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.systemSendMessageRequest=function(title,content,type,toUserId,toType,isSMS,success,ignoreError){
       var request= systemSendMessageRq(true,title,content,type,toUserId,toType,isSMS,success,ignoreError);
       return request;
    }
	this.systemSendMessage=function(title,content,type,toUserId,toType,isSMS,success,ignoreError){
       var request= systemSendMessageRq(false,title,content,type,toUserId,toType,isSMS,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function deleteMessageRq(union,userToken,msgId,success,ignoreError){
        var request=new JlnRequest();
        request.func='deleteMessage';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['mid']=msgId;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.deleteMessageRequest=function(userToken,msgId,success,ignoreError){
       var request= deleteMessageRq(true,userToken,msgId,success,ignoreError);
       return request;
    }
	this.deleteMessage=function(userToken,msgId,success,ignoreError){
       var request= deleteMessageRq(false,userToken,msgId,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function modifyBulletinRq(union,userToken,id,title,content,remark,relationType,relationId,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['id']=id;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;
		request.params['rid']=relationId;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyBulletinRequest=function(userToken,id,title,content,remark,relationType,relationId,success,ignoreError){
       var request= modifyBulletinRq(true,userToken,id,title,content,remark,relationType,relationId,success,ignoreError);
       return request;
    }
	this.modifyBulletin=function(userToken,id,title,content,remark,relationType,relationId,success,ignoreError){
       var request= modifyBulletinRq(false,userToken,id,title,content,remark,relationType,relationId,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function createBulletinRq(union,userToken,title,content,remark,relationType,relationId,success,ignoreError){
        var request=new JlnRequest();
        request.func='createBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;
		request.params['rid']=relationId;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.createBulletinRequest=function(userToken,title,content,remark,relationType,relationId,success,ignoreError){
       var request= createBulletinRq(true,userToken,title,content,remark,relationType,relationId,success,ignoreError);
       return request;
    }
	this.createBulletin=function(userToken,title,content,remark,relationType,relationId,success,ignoreError){
       var request= createBulletinRq(false,userToken,title,content,remark,relationType,relationId,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getBulletinsRq(union,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
        var request=new JlnRequest();
        request.func='getBulletins';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['p']=page;
		request.params['cpp']=countPerPage;
		request.params['id']=isDeleted;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getBulletinsRequest=function(beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
       var request= getBulletinsRq(true,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError);
       return request;
    }
	this.getBulletins=function(beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
       var request= getBulletinsRq(false,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function deleteBulletinRq(union,userToken,id,success,ignoreError){
        var request=new JlnRequest();
        request.func='deleteBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['id']=id;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.deleteBulletinRequest=function(userToken,id,success,ignoreError){
       var request= deleteBulletinRq(true,userToken,id,success,ignoreError);
       return request;
    }
	this.deleteBulletin=function(userToken,id,success,ignoreError){
       var request= deleteBulletinRq(false,userToken,id,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getBulletinRq(union,id,success,ignoreError){
        var request=new JlnRequest();
        request.func='getBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['id']=id;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getBulletinRequest=function(id,success,ignoreError){
       var request= getBulletinRq(true,id,success,ignoreError);
       return request;
    }
	this.getBulletin=function(id,success,ignoreError){
       var request= getBulletinRq(false,id,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getTopBulletinsRq(union,top,success,ignoreError){
        var request=new JlnRequest();
        request.func='getTopBulletins';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['t']=top;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getTopBulletinsRequest=function(top,success,ignoreError){
       var request= getTopBulletinsRq(true,top,success,ignoreError);
       return request;
    }
	this.getTopBulletins=function(top,success,ignoreError){
       var request= getTopBulletinsRq(false,top,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getProductOrTeamBulletinsByTypeRq(union,teamToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductOrTeamBulletinsByType';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['rt']=relationType;
		request.params['aid']=authorId;
		request.params['rid']=relationId;
		request.params['id']=isDeleted;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductOrTeamBulletinsByTypeRequest=function(teamToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
       var request= getProductOrTeamBulletinsByTypeRq(true,teamToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProductOrTeamBulletinsByType=function(teamToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
       var request= getProductOrTeamBulletinsByTypeRq(false,teamToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function createProductBulletinRq(union,teamToken,productId,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='createProductBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.createProductBulletinRequest=function(teamToken,productId,title,content,remark,relationType,success,ignoreError){
       var request= createProductBulletinRq(true,teamToken,productId,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.createProductBulletin=function(teamToken,productId,title,content,remark,relationType,success,ignoreError){
       var request= createProductBulletinRq(false,teamToken,productId,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function createTeamBulletinRq(union,teamToken,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='createTeamBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.createTeamBulletinRequest=function(teamToken,title,content,remark,relationType,success,ignoreError){
       var request= createTeamBulletinRq(true,teamToken,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.createTeamBulletin=function(teamToken,title,content,remark,relationType,success,ignoreError){
       var request= createTeamBulletinRq(false,teamToken,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function modifyProductBulletinRq(union,teamToken,id,productId,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyProductBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['id']=id;
		request.params['pid']=productId;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyProductBulletinRequest=function(teamToken,id,productId,title,content,remark,relationType,success,ignoreError){
       var request= modifyProductBulletinRq(true,teamToken,id,productId,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.modifyProductBulletin=function(teamToken,id,productId,title,content,remark,relationType,success,ignoreError){
       var request= modifyProductBulletinRq(false,teamToken,id,productId,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function modifyTeamBulletinRq(union,teamToken,id,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyTeamBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['id']=id;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyTeamBulletinRequest=function(teamToken,id,title,content,remark,relationType,success,ignoreError){
       var request= modifyTeamBulletinRq(true,teamToken,id,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.modifyTeamBulletin=function(teamToken,id,title,content,remark,relationType,success,ignoreError){
       var request= modifyTeamBulletinRq(false,teamToken,id,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function deleteProductOrTeamBulletinRq(union,teamToken,id,success,ignoreError){
        var request=new JlnRequest();
        request.func='deleteProductOrTeamBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['id']=id;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.deleteProductOrTeamBulletinRequest=function(teamToken,id,success,ignoreError){
       var request= deleteProductOrTeamBulletinRq(true,teamToken,id,success,ignoreError);
       return request;
    }
	this.deleteProductOrTeamBulletin=function(teamToken,id,success,ignoreError){
       var request= deleteProductOrTeamBulletinRq(false,teamToken,id,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getProductBulletinByProductIdRq(union,productId,relationType,isDeleted,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductBulletinByProductId';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pId']=productId;
		request.params['rt']=relationType;
		request.params['id']=isDeleted;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductBulletinByProductIdRequest=function(productId,relationType,isDeleted,page,countPerPage,success,ignoreError){
       var request= getProductBulletinByProductIdRq(true,productId,relationType,isDeleted,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProductBulletinByProductId=function(productId,relationType,isDeleted,page,countPerPage,success,ignoreError){
       var request= getProductBulletinByProductIdRq(false,productId,relationType,isDeleted,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function createSystemBulletinRq(union,userToken,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='createSystemBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.createSystemBulletinRequest=function(userToken,title,content,remark,relationType,success,ignoreError){
       var request= createSystemBulletinRq(true,userToken,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.createSystemBulletin=function(userToken,title,content,remark,relationType,success,ignoreError){
       var request= createSystemBulletinRq(false,userToken,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function modifySystemBulletinRq(union,userToken,id,title,content,remark,relationType,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifySystemBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['id']=id;
		request.params['t']=title;
		request.params['c']=content;
		request.params['r']=remark;
		request.params['rt']=relationType;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifySystemBulletinRequest=function(userToken,id,title,content,remark,relationType,success,ignoreError){
       var request= modifySystemBulletinRq(true,userToken,id,title,content,remark,relationType,success,ignoreError);
       return request;
    }
	this.modifySystemBulletin=function(userToken,id,title,content,remark,relationType,success,ignoreError){
       var request= modifySystemBulletinRq(false,userToken,id,title,content,remark,relationType,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getSystemBulletinsByTypeRq(union,userToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getSystemBulletinsByType';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['rt']=relationType;
		request.params['aid']=authorId;
		request.params['rid']=relationId;
		request.params['id']=isDeleted;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getSystemBulletinsByTypeRequest=function(userToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
       var request= getSystemBulletinsByTypeRq(true,userToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getSystemBulletinsByType=function(userToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError){
       var request= getSystemBulletinsByTypeRq(false,userToken,relationType,authorId,relationId,isDeleted,page,countPerPage,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getSystemBulletinsRq(union,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
        var request=new JlnRequest();
        request.func='getSystemBulletins';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['p']=page;
		request.params['cpp']=countPerPage;
		request.params['id']=isDeleted;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getSystemBulletinsRequest=function(beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
       var request= getSystemBulletinsRq(true,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError);
       return request;
    }
	this.getSystemBulletins=function(beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError){
       var request= getSystemBulletinsRq(false,beginTime,endTime,page,countPerPage,isDeleted,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function deleteSystemBulletinRq(union,userToken,id,success,ignoreError){
        var request=new JlnRequest();
        request.func='deleteSystemBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['id']=id;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.deleteSystemBulletinRequest=function(userToken,id,success,ignoreError){
       var request= deleteSystemBulletinRq(true,userToken,id,success,ignoreError);
       return request;
    }
	this.deleteSystemBulletin=function(userToken,id,success,ignoreError){
       var request= deleteSystemBulletinRq(false,userToken,id,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }

	function getSystemBulletinRq(union,id,success,ignoreError){
        var request=new JlnRequest();
        request.func='getSystemBulletin';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['id']=id;

		if (union == true) {
	        request.svr = 'message';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getSystemBulletinRequest=function(id,success,ignoreError){
       var request= getSystemBulletinRq(true,id,success,ignoreError);
       return request;
    }
	this.getSystemBulletin=function(id,success,ignoreError){
       var request= getSystemBulletinRq(false,id,success,ignoreError);
       messageSubmit(request, success, ignoreError);

    }
}

});
